home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung 2 / Power-Programmierung CD 2 (Tewi)(1994).iso / c / library / bcfamily / source / write.cpp < prev   
Encoding:
C/C++ Source or Header  |  1993-06-12  |  699 b   |  28 lines

  1. //
  2. //      *******************************************************************
  3. //        JdeBP C++ Library Routines          General Public Licence v1.00
  4. //            Copyright (c) 1991,1992     Jonathan de Boyne Pollard
  5. //      *******************************************************************
  6. //
  7. // Part of FamAPI.LIB
  8. //
  9.  
  10. #include "famapi.h"
  11. #include "dosdos.h"
  12.  
  13. //
  14. //    Write data to a file
  15. //
  16. USHORT _APICALL
  17. DosWrite    ( unsigned short fd,
  18.               void far *base,
  19.               unsigned short bufsize,
  20.               unsigned short far *done)
  21. {
  22.     // OS/2 does not truncate on zero length writes
  23.     if (bufsize != 0)
  24.         return DosDosWrite (fd, base, bufsize, done) ;
  25.     else
  26.         return NO_ERROR ;    // Even if file handle is bad
  27. }
  28.